<template>
	<BaseContainer>
		<el-tabs tab-position="left" v-model="activeName">
			<el-tab-pane label="回访规则" name="FollowRule"> </el-tab-pane>
			<el-tab-pane label="回访批次" name="SpotBatch"> </el-tab-pane>
			<el-tab-pane label="回访工单" name="FollowOrder"> </el-tab-pane>
			<el-tab-pane label="二次回访" name="TwoFollowOrder"> </el-tab-pane>
			<component
				:key="activeName"
				:is="whichCommon[activeName]"
				:paramsObj="{
					spotFromType: activeName == 'TwoFollowOrder' ? 2 : 1,
					isWithAuth: ['FollowOrder', 'TwoFollowOrder'].includes(activeName) ? 1 : undefined,
				}"
			></component>
		</el-tabs>
	</BaseContainer>
</template>

<script setup lang="ts">
import FollowRule from './FollowRule/index.vue'
import SpotBatch from './SpotBatch/index.vue'
import FollowOrder from './FollowOrder/index.vue'

const activeName = ref('FollowRule')
const whichCommon = {
	FollowRule,
	SpotBatch,
	FollowOrder,
	TwoFollowOrder: FollowOrder,
}
</script>

<style scoped></style>
